// 自搭建的一个缓存机制
const {set,unset,get} = require('loadsh')
class Cache {
    constructor() {
        this.map = {
            orderStatusCache:{}
        };
    }
    clearOrder() {
        Object.keys(this.map.orderStatusCache).forEach(k=> {
            delete this.map.orderStatusCache[k];
        })
    }
    remove(k) {
        unset(this.map,k)
    }

    get(k) {
        return get(this.map,k);
    }

    set(k,v) {
        set(this.map,k,v)
    }
}

module.exports = Cache;